﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PopQuiz
{
  class Vacation
  {
    // automatic properties
    public string DestinationName { get; set; }
    public DateTime StartDate { get; set; }
    public int NumberOfDays { get; set; }
    
    // calculated property
    public DateTime EndDate 
    {
      get { return StartDate.AddDays(NumberOfDays); }
    }

    //methods
    public decimal CalculateCost(decimal ratePerDay)
    {
      return ratePerDay * NumberOfDays;
    }

    public Vacation() 
    {
      StartDate = DateTime.Today;
    }

    public Vacation(string destination, DateTime starting, int length)
    {
      DestinationName = destination;
      StartDate = starting;
      NumberOfDays = length;
    }

  }
}
